package cn.kgm.makeGod.action;

import cn.kgm.makeGod.Character;
import cn.kgm.makeGod.condition.EventResult;
import cn.kgm.makeGod.condition.WorldState;

/**
 * @Version 1.8
 * @Author: Kappi
 * @Date: 2025-9-11 11:42
 * @Description: cn.kgm.makeGod.action.DialogueAction
 */
public class DialogueAction implements Action {
    private String content;

    public DialogueAction() {
    }

    public DialogueAction(String content) {
        this.content = content;
    }

    @Override
    public void execute(Character actor, Character target, WorldState world, EventResult result) {
        String processedContent = content.replace("#actor.name#", actor.getName())
                .replace("#target.name#", target.getName());
        result.addLog(processedContent);
    }
}
